package routers

import (
	"cashew.com/cashew_api/controllers"
	beego "github.com/beego/beego/v2/server/web"
)

// 注册所有beego路由
func init() {

	beego.Router("/client/page/*", &controllers.PageController{})
	beego.Router("/client/page/malePage", &controllers.PageController{}, "post:GetMalePage")
	beego.Router("/client/page/femalePage", &controllers.PageController{}, "post:GetFemalePage")
	beego.Router("/client/page/homePage", &controllers.PageController{}, "post:GetHomePage")

	//视频通话 - 客户端
	beego.Router("/client/videocall/*", &controllers.VideocallController{})
	beego.Router("/client/videocall/acceptOrder", &controllers.VideocallController{}, "post:AcceptOrder")
	beego.Router("/client/videocall/stopOrder", &controllers.VideocallController{}, "post:StopOrder")
	//beego.Router("/client/videocall/waitCallPage", &controllers.VideocallController{}, "post:WaitCallPage")
	beego.Router("/client/videocall/answerCall", &controllers.VideocallController{}, "post:AnswerCall")
	beego.Router("/client/videocall/stopCall", &controllers.VideocallController{}, "post:StopCall")
	beego.Router("/client/videocall/livingOrderStatusSetting", &controllers.VideocallController{}, "post:LivingOrderStatusSetting")
	beego.Router("/client/videocall/obtainIncome", &controllers.VideocallController{}, "post:ObtainIncome")
	beego.Router("/client/videocall/call", &controllers.VideocallController{}, "post:Call")
	beego.Router("/client/videocall/quickCall", &controllers.VideocallController{}, "post:QuickCall")
	beego.Router("/client/videocall/quickCallMatch", &controllers.VideocallController{}, "post:QuickCallMatch")
	beego.Router("/client/videocall/cancelQuickCall", &controllers.VideocallController{}, "post:CancelQuickCall")
	beego.Router("/client/videocall/sendChat", &controllers.VideocallController{}, "post:SendChat2")
	beego.Router("/client/videocall/updateBlacklist", &controllers.VideocallController{}, "post:UpdateBlacklist")
	beego.Router("/client/videocall/getBlackList", &controllers.VideocallController{}, "post:GetBlacklist")
	beego.Router("/client/videocall/getIsBlackDist", &controllers.VideocallController{}, "post:GetIsBlackDist")
	beego.Router("/client/videocall/evaluate", &controllers.VideocallController{}, "post:Evaluate")
	beego.Router("/client/videocall/paychatUnlock", &controllers.VideocallController{}, "post:PaychatUnlock")
	beego.Router("/client/videocall/sendGift", &controllers.VideocallController{}, "post:SendGift2")
	beego.Router("/client/videocall/getFreeChatCount", &controllers.VideocallController{}, "post:GetFreeChatCount")
	beego.Router("/client/videocall/userInfo", &controllers.VideocallController{}, "post:UserInfo")

	// 测试方法
	beego.Router("/videocall/getAuthCode", &controllers.VideocallController{}, "get:GetAuthCode")
	beego.Router("/videocall/getSonyflakeId", &controllers.VideocallController{}, "get:GetSonyflakeId")
	beego.Router("/videocall/testTransaction", &controllers.VideocallController{}, "get:TestTransaction")
	beego.Router("/videocall/testSubmitTaskToPool", &controllers.VideocallController{}, "post:TestSubmitTaskToPool")
	beego.Router("/videocall/testCountPool", &controllers.VideocallController{}, "get:TestCountPool")

	//视频通话 - 服务端（待删除）
	beego.Router("/videocall/wsConnect", &controllers.VideocallController{}, "post:WsConnect")
	beego.Router("/videocall/wsDisconnect", &controllers.VideocallController{}, "post:WsDisconnect")
	beego.Router("/videocall/sendChat", &controllers.VideocallController{}, "post:SendChat")
	beego.Router("/videocall/interruptsCall", &controllers.VideocallController{}, "post:InterruptsCall")
	beego.Router("/videocall/keepAlive", &controllers.VideocallController{}, "post:KeepAlive")
	//视频通话 - 服务端（后面用这个）
	beego.Router("/server/videocall/wsConnect", &controllers.VideocallController{}, "post:WsConnect")
	beego.Router("/server/videocall/wsDisconnect", &controllers.VideocallController{}, "post:WsDisconnect")
	beego.Router("/server/videocall/sendChat", &controllers.VideocallController{}, "post:SendChat2")
	beego.Router("/server/videocall/interruptsCall", &controllers.VideocallController{}, "post:InterruptsCall")
	beego.Router("/server/videocall/keepAlive", &controllers.VideocallController{}, "post:KeepAlive")

	//主播信息 - 客户端
	beego.Router("/client/anchor/getAnchorInfo", &controllers.AnchorController{}, "post:GetAnchorInfo")
	beego.Router("/client/anchor/getVideoCallMaterials", &controllers.AnchorController{}, "post:GetVideoCallMaterials")
	beego.Router("/client/anchor/submitVideoCallMaterials", &controllers.AnchorController{}, "post:AddVideoCallMaterialsAudit")
	beego.Router("/client/anchor/getVideoCallPriceConfig", &controllers.AnchorController{}, "post:GetVideoCallPriceConfig")
	beego.Router("/client/anchor/updateVideoCallPrice", &controllers.AnchorController{}, "post:UpdateVideoCallPrice")
	beego.Router("/client/anchor/completeUserInfo", &controllers.AnchorController{}, "post:CompleteUserInfo")

	//文件上传
	beego.Router("/file/upload", &controllers.FileController{}, "post:Upload")

	//视频通话 - 客户端
	beego.Router("/auth/*", &controllers.CocoAuthController{})
	beego.Router("/auth/refreshToken", &controllers.CocoAuthController{}, "post:RefreshToken")

	// 免费通话卡
	beego.Router("/platform/freeCalls/sendFreeCalls", &controllers.UserFreeCallsController{}, "post:SendFreeCalls")
	beego.Router("/client/freeCalls/countFreeCalls", &controllers.UserFreeCallsController{}, "post:CountFreeCalls")

	// service 端接口
	beego.Router("/service/freeCalls/sendFreeCalls", &controllers.UserFreeCallsController{}, "post:SendFreeCalls")
	beego.Router("/service/anchor/liveStatusNotify", &controllers.AnchorController{}, "post:LiveStatusNotify")
	beego.Router("/service/region/getSubRegionList", &controllers.RegionController{}, "post:GetSubRegionList")
	// 自由聊天
	beego.Router("/service/freeChat/sendMessage", &controllers.FreeChatController{}, "post:SendMessage")
}
